package org.base23.video.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * AI指导对话会话实体
 */
@Data
@TableName("ai_guidance_conversation")
public class AiGuidanceConversationEntity {

    /**
     * 会话ID
     */
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;

    /**
     * 运动类型
     */
    @TableField("sport_type")
    private String sportType;

    /**
     * 会话状态
     */
    @TableField("status")
    private String status;

    /**
     * 对话标题
     */
    @TableField("title")
    private String title;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 最后更新时间
     */
    @TableField("last_update_time")
    private LocalDateTime lastUpdateTime;

    /**
     * 结束时间
     */
    @TableField("end_time")
    private LocalDateTime endTime;

    /**
     * 消息数量
     */
    @TableField("message_count")
    private Integer messageCount;

    /**
     * 上下文摘要
     */
    @TableField("context_summary")
    private String contextSummary;

    /**
     * 分析结果id
     */
    @TableField("result_id")
    private String resultId;

    /**
     * 对话状态枚举
     */
    public enum ConversationStatus {
        ACTIVE("ACTIVE", "进行中"),
        COMPLETED("COMPLETED", "已完成"),
        CANCELLED("CANCELLED", "已取消");

        private final String code;
        private final String description;

        ConversationStatus(String code, String description) {
            this.code = code;
            this.description = description;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }
    }
} 